home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 041-050 / amok41 / spiele / mastermind / txt / vonwem.mod < prev    next >
Text File  |  1993-11-04  |  5KB  |  157 lines

  1. (*********************************************************************
  2.  *
  3.  *  :Program.        Gibt Requester mit meinem Namen aus
  4.  *  :Author.        Hans Schafft
  5.  *  :Address.        Landfriedstraße 1A - Hinterhaus
  6.  *  :Address.        6900 Heidelberg
  7.  *  :Phone.        06221 - 22416
  8.  *  :Version.        1.0
  9.  *  :Date.        1989
  10.  *  :Copyright.        PD
  11.  *  :Language.        Modula-II
  12.  *  :Translator.    M2Amiga
  13.  *
  14.  *********************************************************************)
  15.  
  16. IMPLEMENTATION MODULE VonWem;
  17.  
  18. FROM SYSTEM    IMPORT    ADR, ADDRESS, LONGSET;
  19. FROM Graphics    IMPORT  jam2, jam1;
  20. FROM Intuition    IMPORT     boolGadget, reqGadget,ActivationFlags,
  21.                   Gadget, GadgetFlagSet, IDCMPFlagSet, IntuiText,
  22.                           Requester, RequesterFlagSet, InitRequester,
  23.                           Border, ActivationFlagSet,WindowPtr, Request;
  24.  
  25. CONST
  26.  RequBreite = 250; RequHoehe = 100;
  27.  GadBreite  =  95; GadHoehe  =  10;
  28.  
  29. VAR
  30.  InfoRequest  : Requester;
  31.  InfoGadText  : IntuiText;
  32.  InfoGad      : Gadget;
  33.  InfoGadBorder: Border;
  34.  InfoGadPairs : ARRAY [1..10] OF INTEGER;
  35.  
  36.  
  37. (***************************************************************)
  38. PROCEDURE ShowReq(wp: WindowPtr);
  39. BEGIN
  40.   IF Request(ADR(InfoRequest), wp) THEN END
  41. END ShowReq;
  42.  
  43.  
  44. (***************************************************************)
  45. PROCEDURE SetUpGadget;
  46. BEGIN
  47.    (* Koordinaten für den Rand der Gadget Box *)
  48.   InfoGadPairs[1] := 0;              InfoGadPairs[2] := 0;
  49.   InfoGadPairs[3] := GadBreite+1;    InfoGadPairs[4] := 0;
  50.   InfoGadPairs[5] := GadBreite+1;    InfoGadPairs[6] := GadHoehe+1;
  51.   InfoGadPairs[7] := 0;              InfoGadPairs[8] := GadHoehe+1;
  52.   InfoGadPairs[9] := 0;              InfoGadPairs[10] := 0;
  53.  
  54.   WITH InfoGadBorder DO
  55.     leftEdge := -1;             topEdge    := -1;
  56.     frontPen := 3;             backPen    := 11;
  57.     drawMode := jam1;             count        := 5;
  58.     xy          := ADR(InfoGadPairs);     nextBorder := NIL;
  59.   END;
  60.  
  61.   WITH InfoGadText DO
  62.     leftEdge  := 3;             topEdge  := 1;
  63.     frontPen  := 12;             backPen  := 4;
  64.     drawMode  := jam2;
  65.     iText     := ADR("Is ja irre!");
  66.     iTextFont := NIL;             nextText := NIL;
  67.   END;
  68.  
  69.   WITH InfoGad DO
  70.     leftEdge        := ( RequBreite DIV 2) - ( GadBreite DIV 2);
  71.     topEdge        :=  RequHoehe - (GadHoehe + 5);
  72.     width        :=  GadBreite; height := GadHoehe;
  73.     flags        :=  GadgetFlagSet{};
  74.     activation       :=  ActivationFlagSet{endGadget, relVerify};
  75.     gadgetType       :=  boolGadget + reqGadget;
  76.     gadgetRender  :=  ADR(InfoGadBorder);
  77.     gadgetText       :=  ADR(InfoGadText);
  78.     mutualExclude :=  LONGSET{};
  79.     nextGadget       :=  NIL;         selectRender := NIL;
  80.     specialInfo   :=  NIL;         userData     := NIL;
  81.     gadgetID       :=  0;
  82.   END;
  83.  END SetUpGadget;
  84.  
  85.  
  86. VAR
  87.  InfoReqBorder: Border;
  88.  InfoReqPairs : ARRAY [1..10] OF INTEGER;
  89.  InfoReqText  : ARRAY [0..5] OF IntuiText;
  90.  
  91.  
  92. (***************************************************************)
  93. PROCEDURE SetUpRequester;
  94.  BEGIN
  95.   InfoReqPairs[1] := 0;              InfoReqPairs[2] := 0;
  96.   InfoReqPairs[3] := RequBreite-3;   InfoReqPairs[4] := 0;
  97.   InfoReqPairs[5] := RequBreite-3;   InfoReqPairs[6] := RequHoehe-3;
  98.   InfoReqPairs[7] := 0;              InfoReqPairs[8] := RequHoehe-3;
  99.   InfoReqPairs[9] := 0;              InfoReqPairs[10] := 0;
  100.  
  101.   WITH InfoReqBorder DO
  102.     leftEdge := 1;            topEdge := 1;
  103.     frontPen := 3;            backPen := 5;
  104.     drawMode := jam2;             count := 5;
  105.     xy := ADR(InfoReqPairs);   nextBorder := NIL;
  106.   END;
  107.  
  108.   InitRequester(ADR(InfoRequest));
  109.  
  110.   WITH InfoRequest DO
  111.     leftEdge     := 50;
  112.     topEdge    := 360;
  113.     width     := RequBreite;
  114.     height    := RequHoehe;
  115.     reqGadget     := ADR(InfoGad);
  116.     reqText     := ADR(InfoReqText);
  117.     reqBorder     := ADR(InfoReqBorder);
  118.     backFill     := 6;
  119.   END;
  120.  
  121.  END SetUpRequester;
  122.  
  123.  
  124. (***************************************************************)
  125. PROCEDURE SetUpRequesterText;
  126.  
  127.  PROCEDURE InitIText(VAR itext: IntuiText; L, T: CARDINAL; Next, text: ADDRESS);
  128.   BEGIN
  129.    WITH itext DO
  130.      leftEdge  := L+2;     topEdge := T;
  131.      frontPen  := 0;     backPen := 6;
  132.      drawMode  := jam2;
  133.      iText     := text;
  134.      iTextFont := NIL; nextText := Next
  135.    END
  136.   END InitIText;
  137.  
  138.  BEGIN
  139.   InitIText(InfoReqText[0], 4, 10, ADR(InfoReqText[1]),
  140.         ADR("AMIGA - MASTERMIND - ADAPTION."));
  141.   InitIText(InfoReqText[1], 4, 30, ADR(InfoReqText[2]),
  142.         ADR("Anregungen, Komplimente, Geld,"));
  143.   InitIText(InfoReqText[2], 4, 40, ADR(InfoReqText[3]),
  144.         ADR("Verbesserungsvorschläge !? an:"));
  145.   InitIText(InfoReqText[3], 4, 50, ADR(InfoReqText[4]),
  146.         ADR("Hans Schafft, 6900 Heidelberg"));
  147.   InitIText(InfoReqText[4], 4, 60, ADR(InfoReqText[5]),
  148.         ADR("Landfriedstr. 1A - Hinterhaus"));
  149.   InitIText(InfoReqText[5], 40, 70, NIL,
  150.         ADR("Telefon: 06221 - 22416"));
  151.  END SetUpRequesterText;
  152.  
  153.  
  154. BEGIN
  155.  SetUpGadget; SetUpRequesterText; SetUpRequester;
  156. END VonWem.
  157.